//
// Created by jsjxsy on 2022/8/17.
//
#include <iostream>
using namespace std;
class Base {
 public:
  virtual double f1(double) noexcept;
  virtual int f2(int) noexcept(false);
  virtual void f3();
};

class Derived : public Base {
 public:
  double f1(double) noexcept;
//  double f1(double a);//错误
  int f2(int a);
  void f3();
};

double Derived::f1(double a) noexcept {
  cout << "f1()" << a << endl;
  return 1.1f;
}

int Derived::f2(int a) {
  cout << "f2()" << a << endl;
  return 1;
}

int main() {
  Derived d;
  d.f1(1);

  return 0;
}
